package com.yp.lession79.esqf2111.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
public class ElatciSeacherCOnfig {
//@Bean
    public RestHighLevelClient createRestHighLevelClient() {
    HttpHost host = new HttpHost("192.168.200.128", 9200);
    RestClientBuilder builder = RestClient.builder(host);
    RestHighLevelClient client = new RestHighLevelClient(builder);
    return client;
   }

}
